<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .a {
        color: red;
      }
      .b {
        font-size: 2rem;
      }

      .c {
        border: solid;
      }
    </style>
  </head>
  <body>
    <div id="box" class="a">hello div</div>
    <script>
      const box = document.getElementById("box");
      // console.log(box.className);
      console.log(box.classList);
      setTimeout(() => {
        // box.className += " b c";
        box.classList.add("b", "c");
      }, 3000);

      setTimeout(() => {
        box.classList.remove("b", "c");
        // box.className = box.className.replace("b", "");
        // box.className = box.className.replace("c", "");
      }, 5000);
    </script>
  </body>
</html>
